home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 31
/
Aminet 31 (1999)(Schatztruhe)[!][Jun 1999].iso
/
Aminet
/
dev
/
obero
/
OberonAModules.lha
/
Triton.mod
< prev
next >
Wrap
Text File
|
1999-02-26
|
25KB
|
561 lines
(***************************************************************************
$RCSfile: Triton.mod $
Description: Interface to triton.library
Created by: Helmuth Ritzer
$Revision: 1.0 $
$Author: hr $
$Date: 1995/01/21 16:06:42 $
This is a modified version of the interface module for
AmigaOberon done by Peter Fröhlich.
This release contains no translations of the C macros.
***************************************************************************
Updated by: Morten Bjergstrøm
EMail: mbjergstroem@hotmail.com
)
<* STANDARD- *>
MODULE [2] Triton;
IMPORT
SYS := SYSTEM, Kernel, e := Exec, u := Utility, gfx := Graphics,
i := Intuition, gt := GadTools, w := Workbench;
(*****************************************************************************)
CONST
tritonName * = "triton.library";
(*****************************************************************************)
TYPE
MessagePtr* = POINTER TO Message;
AppPtr* = POINTER TO App;
DimensionsPtr* = POINTER TO Dimensions;
ProjectPtr* = POINTER TO Project;
DisplayObjectPtr* = POINTER TO RECORD END;
(* --- The Triton message --- *)
Message* = RECORD
project- : ProjectPtr; (* The project which triggered the message *)
id- : e.ULONG; (* The object's ID (where appropriate) *)
class- : e.ULONG; (* The Triton message class *)
data- : e.ULONG; (* The class-specific data *)
code- : e.ULONG; (* \ Currently only used *)
qualifier- : e.ULONG; (* / by TRMS_KEYPRESSED *)
seconds- : e.ULONG; (* \ Copy of system clock time (Only where *)
micros- : e.ULONG; (* / available! If not set, trm_Seconds is NULL) *)
app- : AppPtr; (* The project's application *)
END;
(* --- The Application Structure --- *)
App* = RECORD (* This structure is PRIVATE! *)
memPool : e.ADDRESS; (* The memory pool *)
bitMask : e.LONGBITS; (* Bits to Wait() for *)
name : e.STRPTR; (* Unique name *)
longName : e.STRPTR; (* User-readable name *)
info : e.STRPTR; (* Info string *)
version : e.STRPTR; (* Version *)
release : e.STRPTR; (* Release *)
date : e.STRPTR; (* Compilation date *)
appPort : e.MsgPortPtr; (* AppMessage port *)
idcmpPort : e.MsgPortPtr; (* IDCMP message port *)
prefs : e.ADDRESS; (* Pointer to Triton app prefs *)
lastProject : ProjectPtr; (* Used for menu item linking *)
(*inputEvent : IE.InputEventPtr*) (* Used for RAWKEY conversion *)
END;
(* --- The Dimensions Structure --- *)
Dimensions* = RECORD
left* : e.UWORD; (* Left *)
top* : e.UWORD; (* Top *)
width* : e.UWORD; (* Width *)
height* : e.UWORD; (* Height *)
left2* : e.UWORD; (* Left *)
top2* : e.UWORD; (* Top *)
width2* : e.UWORD; (* Width *)
height2* : e.UWORD; (* Height *)
zoomed* : e.BOOL; (* Window zoomed? *)
reserved* : ARRAY 3 OF e.UWORD; (* For future expansions *)
END;
(* --- The Project Structure --- *)
Project* = RECORD (* This structure is PRIVATE! *)
app : AppPtr; (* Our application *)
screen : i.ScreenPtr; (* Our screen, always valid *)
lockedPubScreen : i.ScreenPtr; (* Only valid if we're using a PubScreen *)
window : i.WindowPtr; (* The window *)
id : e.ULONG; (* The window ID *)
appWindow : w.AppWindowPtr; (* AppWindow for icon dropping *)
idcmpFlags : e.ULONG; (* The IDCMP flags *)
flags : e.ULONG; (* Triton window flags *)
newMenu : gt.NewMenuPtr; (* The newmenu stucture built by Triton *)
newMenuSize : e.ULONG; (* The number of menu items in the list *)
menu : i.MenuPtr; (* The menu structure *)
nextSelect : e.UWORD; (* The next selected menu item *)
visualInfo : e.ADDRESS; (* The VisualInfo of our window *)
drawInfo : i.DrawInfoPtr; (* The DrawInfo of the screen *)
dimensions : DimensionsPtr; (* User-supplied dimensions *)
windowStdHeight : e.ULONG; (* The standard height of the window *)
leftBorder : e.ULONG; (* The width of the left window border *)
rightBorder : e.ULONG; (* The width of the right window border *)
topBorder : e.ULONG; (* The height of the top window border *)
bottomBorder : e.ULONG; (* The height of the bottom window border *)
innerWidth : e.ULONG; (* The inner width of the window *)
innerHeight : e.ULONG; (* The inner height of the window *)
zipDimensions : ARRAY 4 OF e.WORD; (* The dimensions for the zipped window *)
aspectFixing : e.UWORD; (* Pixel aspect correction factor *)
objectList : e.MinList; (* The list of display objects *)
menuList : e.MinList; (* The list of menus *)
idList : e.MinList; (* The ID linking list (menus & objects) *)
memPool : e.ADDRESS; (* The memory pool for the lists *)
hasObjects : e.BOOL; (* Do we have display objects ? *)
propAttr : gfx.TextAttrPtr; (* The proportional font attributes *)
fixedWidthAttr : gfx.TextAttrPtr; (* The fixed-width font attributes *)
propFont : gfx.TextFontPtr; (* The proportional font *)
fixedWidthFont : gfx.TextFontPtr; (* The fixed-width font *)
openedPropFont : e.BOOL; (* \ Have we opened the fonts ? *)
openedFixedWidthFont : e.BOOL; (* / *)
totalPropFontHeight : e.UWORD; (* Height of prop font incl. underscore *)
backfillType : e.ULONG; (* The backfill type *)
backfillHook : u.HookPtr; (* The backfill hook *)
gadToolsGadgetList : i.GadgetPtr; (* List of GadTools gadgets *)
prevGadget : i.GadgetPtr; (* Previous GadTools gadget *)
newGadget : gt.NewGadgetPtr; (* GadTools NewGadget *)
invisibleRequest : i.RequesterPtr; (* The invisible blocking requester *)
isUserLocked : e.BOOL; (* Project locked by the user? *)
currentID : e.ULONG; (* The currently keyboard-selected ID *)
isCancelDown : e.BOOL; (* Cancellation key pressed? *)
isShortcutDown : e.BOOL; (* Shortcut key pressed? *)
underscore : e.UBYTE; (* The underscore character *)
escClose : e.BOOL; (* Close window on Esc ? *)
delZip : e.BOOL; (* Zip window on Del ? *)
pubScreenFallBack : e.BOOL; (* Fall back onto default public screen ? *)
fontFallBack : e.BOOL; (* Fall back to topaz.8 ? *)
oldWidth : e.UWORD; (* Old window width *)
oldHeight : e.UWORD; (* Old window height *)
quickHelpWindow : i.WindowPtr; (* The QuickHelp window *)
quickHelpObject : DisplayObjectPtr; (* Object for which help is popped up *)
ticksPassed : e.ULONG; (* IntuiTicks passed since last MouseMove *)
END;
CONST
(* --- Message classes --- *)
msCloseWindow* = 1; (* The window should be closed *)
msError* = 2; (* An error occured. Error code in trm_Data *)
msNewValue